home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat2 / standard / rename.z / rename
Encoding:
Text File  |  1998-10-20  |  8.5 KB  |  199 lines

  1.  
  2.  
  3.  
  4. rrrreeeennnnaaaammmmeeee((((2222))))                                                            rrrreeeennnnaaaammmmeeee((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _rrrr_eeee_nnnn_aaaa_mmmm_eeee - change the name of a file
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>>
  13.  
  14.      _iiii_nnnn_tttt _rrrr_eeee_nnnn_aaaa_mmmm_eeee_((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_oooo_llll_dddd_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_nnnn_eeee_wwww_))))_;;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _rrrr_eeee_nnnn_aaaa_mmmm_eeee renames a file.  _o_l_d is a pointer to the pathname of the file or
  18.      directory to be renamed.  _n_e_w is a pointer to the new pathname of the
  19.      file or directory.  Both _o_l_d and _n_e_w must be of the same type (either
  20.      both files, or both directories) and must reside on the same file system.
  21.  
  22.      If _n_e_w already exists, it is removed.  Thus, if _n_e_w names an existing
  23.      directory, the directory must not have any entries other than, possibly,
  24.      ``_....'' and ``_...._....''.  When renaming directories, the _n_e_w pathname must not
  25.      name a descendant of _o_l_d.  The implementation of _rrrr_eeee_nnnn_aaaa_mmmm_eeee ensures that upon
  26.      successful completion a link named _n_e_w will always exist.
  27.  
  28.      If the final component of _o_l_d is a symbolic link, the symbolic link is
  29.      renamed, not the file or directory to which it points.
  30.  
  31.      Write permission is required for both the directory containing _o_l_d and
  32.      the directory containing _n_e_w.
  33.  
  34.      _rrrr_eeee_nnnn_aaaa_mmmm_eeee fails, _o_l_d is not changed, and no _n_e_w file is created if one or
  35.      more of the following are true:
  36.  
  37.      _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS              A component of either path prefix denies search
  38.                          permission; one of the directories containing _o_l_d or
  39.                          _n_e_w denies write permission; one of the directories
  40.                          pointed to by _o_l_d or _n_e_w denies write permission; or
  41.                          _n_e_w exists and write permission is denied on _n_e_w.
  42.  
  43.      _EEEE_BBBB_UUUU_SSSS_YYYY               _n_e_w is a directory and the mount point for a mounted
  44.                          file system.
  45.  
  46.      _EEEE_DDDD_QQQQ_UUUU_OOOO_TTTT              The directory in which the entry for the new name is
  47.                          being placed cannot be extended because the user's
  48.                          quota of disk blocks on the file system containing
  49.                          the directory has been exhausted.
  50.  
  51.      _EEEE_EEEE_XXXX_IIII_SSSS_TTTT              The link named by _n_e_w is a directory containing
  52.                          entries other than ``_....'' and ``_...._....''.
  53.  
  54.      _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT              _o_l_d or _n_e_w points outside the process's allocated
  55.                          address space.
  56.  
  57.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL              _o_l_d is a parent directory of _n_e_w, or an attempt is
  58.                          made to rename ``_....'' or ``_...._....''.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. rrrreeeennnnaaaammmmeeee((((2222))))                                                            rrrreeeennnnaaaammmmeeee((((2222))))
  71.  
  72.  
  73.  
  74.      _EEEE_IIII_NNNN_TTTT_RRRR               A signal was caught during execution of the _rrrr_eeee_nnnn_aaaa_mmmm_eeee
  75.                          system call.
  76.  
  77.      _EEEE_IIII_OOOO                 An I/O error occurred while making or updating a
  78.                          directory entry.
  79.  
  80.      _EEEE_IIII_SSSS_DDDD_IIII_RRRR              _n_e_w points to a directory but _o_l_d points to a file
  81.                          that is not a directory.
  82.  
  83.      _EEEE_LLLL_OOOO_OOOO_PPPP               Too many symbolic links were encountered in
  84.                          translating _o_l_d or _n_e_w.
  85.  
  86.      _EEEE_MMMM_UUUU_LLLL_TTTT_IIII_HHHH_OOOO_PPPP           Components of pathnames require hopping to multiple
  87.                          remote machines and the file system type does not
  88.                          allow it.
  89.  
  90.      _EEEE_NNNN_AAAA_MMMM_EEEE_TTTT_OOOO_OOOO_LLLL_OOOO_NNNN_GGGG        The length of the _o_l_d or _n_e_w argument exceeds
  91.                          {_PPPP_AAAA_TTTT_HHHH______MMMM_AAAA_XXXX}, or the length of a _o_l_d or _n_e_w component
  92.                          exceeds {_NNNN_AAAA_MMMM_EEEE______MMMM_AAAA_XXXX} while ______PPPP_OOOO_SSSS_IIII_XXXX______NNNN_OOOO______TTTT_RRRR_UUUU_NNNN_CCCC is in
  93.                          effect.
  94.  
  95.      _EEEE_NNNN_OOOO_EEEE_NNNN_TTTT              A component of either _o_l_d or _n_e_w does not exist, or
  96.                          the file referred to by either _o_l_d or _n_e_w does not
  97.                          exist.
  98.  
  99.      _EEEE_NNNN_OOOO_LLLL_IIII_NNNN_KKKK             Pathnames point to a remote machine and the link to
  100.                          that machine is no longer active.
  101.  
  102.      _EEEE_NNNN_OOOO_SSSS_PPPP_CCCC              The directory that would contain _n_e_w is out of space.
  103.  
  104.      _EEEE_NNNN_OOOO_TTTT_DDDD_IIII_RRRR             A component of either path prefix is not a directory;
  105.                          or the _o_l_d parameter names a directory and the _n_e_w
  106.                          parameter names a file.
  107.  
  108.      _EEEE_RRRR_OOOO_FFFF_SSSS               The requested operation requires writing in a
  109.                          directory on a read-only file system.
  110.  
  111.      _EEEE_XXXX_DDDD_EEEE_VVVV               The links named by _o_l_d and _n_e_w are on different file
  112.                          systems.
  113.  
  114. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  115.      Upon successful completion, a value of 0 is returned.  Otherwise, a value
  116.      of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
  117.  
  118. NNNNOOOOTTTTEEEESSSS
  119.      The system can deadlock if there is a loop in the file system graph.
  120.      Such a loop takes the form of an entry in directory _a, say _a/_f_o_o, being a
  121.      hard link to directory _b, and an entry in directory _b, say _b/_b_a_r, being a
  122.      hard link to directory _a.  When such a loop exists and two separate
  123.      processes attempt to perform _rrrr_eeee_nnnn_aaaa_mmmm_eeee _a/_f_o_o _b/_b_a_r and _rrrr_eeee_nnnn_aaaa_mmmm_eeee _b/_b_a_r _a/_f_o_o,
  124.      respectively, the system may deadlock attempting to lock both directories
  125.      for modification.  The system administrator should replace hard links to
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. rrrreeeennnnaaaammmmeeee((((2222))))                                                            rrrreeeennnnaaaammmmeeee((((2222))))
  137.  
  138.  
  139.  
  140.      directories by symbolic links.
  141.  
  142. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  143.      _llll_iiii_nnnn_kkkk(2), _uuuu_nnnn_llll_iiii_nnnn_kkkk(2) _cccc_hhhh_mmmm_oooo_dddd(2), _oooo_pppp_eeee_nnnn(2).
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.